<template>
	<view v-if="currentChatGroup!=null&&currentChatGroup.imGroup!=null">
		<view>
			<u-navbar :title="navbarTitle" :border-bottom="true" :title-bold="true" :height="60"></u-navbar>
		</view>
		<view class="content-body">
			<scroll-view scroll-y="true" class="scroll-Y" v-if="groupMemberList.length>0">
				<view>
					<view class="grid-box">
						<view class="grid-body">
							<u-grid :col="5" :border="false">
								<u-grid-item @click="clickUser" v-for="(user, index) in groupMemberList" :index="index"
									:key="index">
									<u-image show-loading width="80rpx" height="80rpx" :src="user.userAvatar"
										border-radius="4">
										<view slot="error" class="u-border u-flex u-row-center u-col-center"
											style="background-color: #FFFFFF;width:80rpx;height: 80rpx;border-radius: 10rpx;">
											<u-image show-loading bgColor="#ffffff" width="60rpx" height="60rpx"
												src="/static/image/default/default-user/default-user.png"></u-image>
										</view>
									</u-image>
									<view class="grid-text u-line-1">
										<text>{{user.friendName?user.friendName:user.userName}}</text>
									</view>
								</u-grid-item>
							</u-grid>
						</view>
					</view>
				</view>
				<view v-if="currentChatGroup.imGroup&&currentChatGroup.imGroup.memberCounts>20">
					<view style="text-align: center;font-size: 32rpx;padding-bottom: 20rpx;">
						<u-icon @click="showMoreMember()" name="arrow-right" color="#909399" label-size="32rpx"
							label-color="#909399" label="查看更多群成员" label-pos="left"></u-icon>
					</view>
				</view>
			</scroll-view>
			<u-gap height="24" bg-color="#ededed"></u-gap>
			<view class="list-option">
				<!-- 多人群聊 -->
				<template v-if="currentChatGroup.imGroup.groupType!=0">
					<u-cell-item :titleStyle="titleStyle" title="群聊名称" :border-top="false" :border-bottom="true"
						:value="currentChatGroup.imGroup.groupName" @click="toUpdateChatName()"></u-cell-item>
					<u-cell-item :titleStyle="titleStyle" title="群头像" @click="toUpdateGroupAvatar()" :border-top="false"
						:border-bottom="true">
						<view slot="right-icon">
							<u-image :src="currentChatGroup.imGroup.groupAvatar" width="70rpx" height="70rpx">
								<view slot="error">
									<u-image src="/static/image/default/group/chatgpt.png" width="70rpx"
										height="70rpx"></u-image>
								</view>
							</u-image>
						</view>
					</u-cell-item>
					<u-cell-item :titleStyle="titleStyle" title="群公告" :border-top="false" :border-bottom="false"
						@click="toSetChatNotice()"
						:label="currentChatGroup.imGroup.groupNotice?currentChatGroup.imGroup.groupNotice:'无'"></u-cell-item>
					<u-gap height="24" bg-color="#ededed"></u-gap>
				</template>

				<u-cell-item :titleStyle="titleStyle" title="消息免打扰" :border-top="false" :border-bottom="true"
					:arrow="false" hover-class="none">
					<u-switch active-color="#19BE6B" slot="right-icon" v-model="pingbiFlag"
						@change="changePingBiFlag"></u-switch>
				</u-cell-item>
				<u-cell-item :titleStyle="titleStyle" title="置顶群聊" :border-top="false" :border-bottom="false"
					:arrow="false" hover-class="none">
					<u-switch active-color="#19BE6B" slot="right-icon" v-model="topFlag"
						@change="changeTopFlag"></u-switch>
				</u-cell-item>

				<!-- 点对点 -->
				<template v-if="currentChatGroup.imGroup.groupType==0">
					<u-gap height="24" bg-color="#ededed"></u-gap>
					<u-cell-item :titleStyle="titleStyle" title="设置备注" :border-top="false" :border-bottom="true"
						:value="currentChatGroup.imGroup.groupName" @click="toSetFriendName()"></u-cell-item>
					<u-cell-item :titleStyle="titleStyle" title="拉入黑名单" :border-top="false" :border-bottom="true"
						:arrow="false" hover-class="none">
						<u-switch active-color="#19BE6B" slot="right-icon" v-model="blackStatus"
							@change="changeBlackStatus"></u-switch>
					</u-cell-item>
					<u-cell-item :titleStyle="titleStyle" title="立即投诉" :border-top="false" :border-bottom="false"
						@click="toReport()">
					</u-cell-item>
				</template>
			</view>
		</view>
		<view class="footer-option">
			<view class="u-m-l-10 u-m-r-10">
				<u-button :custom-style="btnCustomStyle" @click="openConfrimModel(2)" :hair-line="false" :ripple="true"
					ripple-bg-color="#dd6161">
					<text style="color:#fa3534;font-size: 34rpx;">清空聊天记录</text>
				</u-button>
			</view>
			<view>
				<u-gap height="24" bg-color="#ededed"></u-gap>
			</view>
			<view class="u-m-l-10 u-m-r-10" v-if="currentChatGroup.imGroup.groupType!=0">
				<u-button v-if="currentChatGroup.imGroup.createUser!=currentUserId" :custom-style="btnCustomStyle"
					@click="openConfrimModel(0)" :hair-line="false" :ripple="true" ripple-bg-color="#dd6161">
					<text style="color:#fa3534;font-size: 34rpx;">退出群聊</text>
				</u-button>
				<u-button v-else :custom-style="btnCustomStyle" @click="openConfrimModel(1)" :hair-line="false"
					:ripple="true" ripple-bg-color="#dd6161">
					<text style="color:#fa3534;font-size: 34rpx;">解散群组</text>
				</u-button>
			</view>
		</view>
		<u-modal v-model="confirmModelFlag" :content="confirmContent" show-cancel-button confirm-color="#19BE6B"
			@confirm="confirmOption()" @cancel="closeConfirmModel()">
		</u-modal>
		<!-- 举报弹窗 -->
		<u-modal v-model="reportShow" :mask-close-able="false" width="70%" ref="uModal" :async-close="true"
			:show-title="true" title="确定要举报他吗?" show-cancel-button cancel-text="再想想" cancel-color="#888787"
			show-confirm-button confirm-text="确定" confirm-color="#EA4335" @confirm="confrimReport()"
			@cancel="cancelReport()">
			<view style="color: #0F1317;padding:50rpx 30rpx">
				<u-input v-model="reportDesc" type="textarea" placeholder="请输入举报内容" :maxlength="500" :border="true"
					:height="100" :auto-height="true" />
			</view>
		</u-modal>
		
		<u-popup mode="center" v-model="setFriendNamePopFlag" length="90%">
			<view class="content u-p-30">
				<view class="u-m-t-30 u-flex u-row-between u-col-center">
					<view style="width: 30%;">设置备注</view>
					<view  style="width: 70%;">
						<u-input v-model="newFriendName"  :clearable="true"
						type="text" :border="true" input-align="left"/>
					</view>
				</view>
				<view class="u-m-t-30">
					<u-button type="success" @click="submitSetFriendName()">确定</u-button>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				navbarTitle: '聊天信息',
				currentChatGroupId: '',
				currentChatGroup: {},
				groupMemberList: [],
				currentUserId: '',
				friendInfoObj: null,
				setFriendNamePopFlag:false,
				newFriendName:"",
				blackStatus: false,
				pingbiFlag: false,
				topFlag: false,
				advShowFlag: true,
				forbidFlag: false,
				titleStyle: {
					fontSize: "32rpx",
					color: "#333333",
				},
				btnCustomStyle: {
					border: 'none',
					backgroundColor: 'none',
					height: '90rpx'
				},
				confirmModelFlag: false,
				confirmContent: '',
				optionType: 0,
				reportShow: false, //举报弹窗,
				reportDesc: '', //举报的内容
				memberCountShow: false,
				memberCountList: [{
						label: '不限制',
						value: -1
					},
					{
						label: '50人',
						value: 50
					},
					{
						label: '100人',
						value: 100
					},
					{
						label: '150人',
						value: 150
					},
					{
						label: '200人',
						value: 200
					},
					{
						label: '250人',
						value: 250
					},
					{
						label: '300人',
						value: 300
					},
					{
						label: '350人',
						value: 350
					},
					{
						label: '400人',
						value: 400
					},
					{
						label: '450人',
						value: 450
					},
					{
						label: '500人',
						value: 500
					}
				],
			};
		},
		onLoad: function(option) {
			let that = this;
			that.currentUserId = that.vuex_userInfo.id;
			that.currentChatGroupId = option.chatGroupId;
			that.getChatGroupInfo();
			uni.$on("groupInfoListener", function(newGroup) {
				setTimeout(function() {
					that.getChatGroupInfo();
				}, 500)
			});
		},
		methods: {
			//获取群组信息
			getChatGroupInfo: function() {
				let that = this;
				let param = {
					chatGroupId: that.currentChatGroupId
				};
				that.$u.api.chatGroup.getChatGroupInfo(param).then(res => {
					if (res.code == 200) {
						let data = res.data;
						console.log("===data====", data);
						that.currentChatGroup = data;
						if (that.currentChatGroup.imGroup.groupType == 0) {
							that.navbarTitle = "聊天详情";
							let friendId = that.currentChatGroup.imGroup.friendUserId;
							that.getFriendInfo(friendId);
						} else {
							that.navbarTitle = "聊天信息(" + that.currentChatGroup.imGroup.memberCounts + ")";
						}
						//是否屏蔽
						let pingBiStaus = that.currentChatGroup.groupUser.chatStatus;
						if (pingBiStaus == 1) {
							this.pingbiFlag = true;
						} else {
							this.pingbiFlag = false;
						}
						//是否置顶
						let topStatus = that.currentChatGroup.groupUser.topFlag;
						if (topStatus == 1) {
							this.topFlag = true;
						} else {
							this.topFlag = false;
						}
						//是否显示公告
						let advShowFlag = that.currentChatGroup.imGroup.showNoticeFlag;
						if (advShowFlag == 1) {
							this.advShowFlag = true;
						} else {
							this.advShowFlag = false;
						}
						//群禁言
						let groupStatus = that.currentChatGroup.imGroup.groupStatus;
						if (groupStatus == 2) {
							this.forbidFlag = true;
						} else {
							this.forbidFlag = false;
						}
						console.log("群信息", that.currentChatGroup);
						that.getChatGroupMembers();
					} else {
						that.globalUtil.utilAlert("群信息获取失败");
						return;
					}
				})
			},
			//获取群成员
			getChatGroupMembers: function() {
				let that = this;
				let param = {
					chatGroupId: that.currentChatGroupId,
					limitFlag: 1, //前15条
				};
				that.$u.api.chatGroup.getChatGroupMembers(param).then(res => {
					if (res.code == 200) {
						that.groupMemberList = res.data;
						if (that.groupMemberList.length > 0) {
							setTimeout(function() {
								if (that.currentChatGroup.imGroup.groupType != 0) {
									if (that.currentChatGroup.groupUser.memberType > 0) {
										let addItem = {
											userAvatar: '/static/image/chat/addMember.png',
											"id": -1,
											"userName": "添加",
											"userId": -1
										};
										that.groupMemberList.push(addItem);
										let delItem = {
											userAvatar: '/static/image/chat/deleteMember.png',
											"id": -2,
											"userName": "移除",
											"userId": -2
										};
										that.groupMemberList.push(delItem);
									}
								} else {
									that.groupMemberList = that.groupMemberList.filter((member) => {
										return member.userId != that.currentUserId;
									})
								}
							}, 200);
							//console.log("群成员列表", that.groupMemberList);
						}
					} else {
						that.globalUtil.utilAlert("群成员获取失败");
						return;
					}
				})
			},
			//获取朋友信息
			getFriendInfo: function(friendId) {
				let that = this;
				let obj = {
					friendId: friendId
				};
				that.$u.api.imUser.getFriendInfo(obj).then(res => {
					if (res != null && res.data != null && res.code === 200) {
						this.friendInfoObj = res.data;
						console.log("获取我的好友信息", this.friendInfoObj);
						if (this.friendInfoObj.status == 3) {
							this.blackStatus = true;
						} else {
							this.blackStatus = false;
						}
					} else {
						uni.hideLoading();
						return;
					}
				}).catch(res => {
					uni.hideLoading();
				})
			},
			//点击用户
			clickUser: function(index) {
				let that = this;
				let userInfo = that.groupMemberList[index];
				//真实的用户
				if (userInfo.userId > 0) {
					console.log("点击用户", userInfo);
					let userId = userInfo.userId;
					if (that.currentUserId == userId) {
						return;
					}
					let param = {
						keyWord: userInfo.userId,
						userId: userInfo.userId
					};
					that.$u.api.imUser.searchUser(param).then(res => {
						if (res.code == 200) {
							console.log("搜索用户结果", res);
							if (res.data != null && res.data.length > 0) {
								let user = res.data[0];
								if (user.isFriend) {
									this.$u.route({
										url: '/pages/tabbar/contact/friends/friend-home',
										params: {
											friendId: user.id
										},
									})
								} else {
									that.globalUtil.utilAlert("群内禁止添加好友");
									return;
								}
							} else {
								that.globalUtil.utilAlert("该用户状态异常!");
								return;
							}
						}
					})
				}
				//添加成员
				if (userInfo.userId == -1) {
					let param = {
						optionType: 0,
						chatGroupId: that.currentChatGroupId
					}
					this.$u.route("/pages/tabbar/group/set/optionGroupMembers", param);
					return;
				}
				//删除成员
				if (userInfo.userId == -2) {
					let param = {
						optionType: 1,
						chatGroupId: that.currentChatGroupId
					}
					this.$u.route("/pages/tabbar/group/set/optionGroupMembers", param);
					return;
				}
			},
			//查看更多群成员
			showMoreMember: function() {
				let param = {
					chatGroupId: this.currentChatGroupId,
					optionType: 0
				}
				this.$u.route("/pages/tabbar/group/set/showMoreGroupMember", param);
				return;
			},
			//是否屏蔽群信息
			changePingBiFlag: function(pingBiFlag) {
				let that = this;
				console.log("===pingBiFlag===", pingBiFlag);
				if (pingBiFlag == true) {
					that.currentChatGroup.groupUser.chatStatus = 1;
				} else {
					that.currentChatGroup.groupUser.chatStatus = 0;
				}
				console.log("改变屏蔽状态", that.currentChatGroup);
				that.localGroupApi.updateMyGroupSetInfo(that.currentChatGroup, that, function(res) {
					uni.$emit("chattinGroupListener", false);
				});
			},
			//是否拉黑对方
			changeBlackStatus(flag) {
				let that = this;
				if (flag == true) {
					this.friendInfoObj.status = 3;
				} else {
					this.friendInfoObj.status = 1;
				};
				that.$u.api.imUser.blackFriend(this.friendInfoObj).then(res => {
					if (res.code == 200) {
						this.globalUtil.utilAlert("设置成功");
					}
				})
			},
			//去举报用户
			toReport: function() {
				this.reportShow = true;
			},
			//确定举报对方
			confrimReport() {
				let that = this;
				if (this.reportDesc.length < 1) {
					this.globalUtil.utilAlert("举报内容不能为空!");
					this.$refs.uModal.clearLoading();
					return;
				}
				let report = {
					userId: that.friendInfoObj.friendId,
					reportDesc: that.reportDesc
				};
				this.$u.api.imUser.reportUser(report).then(res => {
					if (res.code == 200) {
						this.globalUtil.utilAlert("已提交举报,待系统处理");
						this.cancelReport();
					} else {
						let msg = res.message;
						this.globalUtil.utilAlert(msg);
						this.cancelReport();
					}
				})
			},
			//取消举报
			cancelReport() {
				this.reportShow = false;
				this.reportDesc = "";
			},
			//是否置顶聊天
			changeTopFlag: function(topFlag) {
				let that = this;
				if (topFlag == true) {
					that.currentChatGroup.groupUser.topFlag = 1;
				} else {
					that.currentChatGroup.groupUser.topFlag = 0;
				}
				that.localGroupApi.updateMyGroupSetInfo(that.currentChatGroup, that, function(res) {
					if (res.code == 200) {
						uni.$emit("chattinGroupListener", false);
					}
				});
			},
			//禁言设置
			changeForbidFlag: function(forbidFlag) {
				let that = this;
				let chatGroupStatus = 0;
				if (forbidFlag == true) {
					chatGroupStatus = 2;
				} else {
					chatGroupStatus = 0;
				}
				let param = {
					id: that.currentChatGroupId,
					chatGroupStatus: chatGroupStatus
				}
				console.log("改变禁言设置状态", param);
				that.$u.api.chatGroup.updateGroupStatus(param).then(res => {
					console.log("禁言状态发送变化", res);
					if (res.code == 200) {
						if (res.code == 200) {
							that.globalUtil.utilAlert("更新成功!");
						} else {
							that.globalUtil.utilAlert("更新失败");
							return;
						}
						that.getChatGroupInfo();
					}
				})
			},
			//搜索聊天内容(未开发完成)
			toSearchChatContent: function() {
				this.globalUtil.utilAlert("发量不足,疲于开发~");
				return
			},
			//清空聊天记录
			toClearChatContent: function() {
				let that = this;
				let groupId = that.currentChatGroupId;
				let param = {
					"groupId": groupId
				}
				that.$u.api.chatGroup.clearChatMessage(param).then(res => {
					console.log("清空聊天记录结果", res);
					if (res.code == 200) {
						uni.$emit("chattinGroupListener", true);
						uni.$emit("updateGroupList", null); //刷新列表
						that.globalUtil.utilAlert("完成", "success");
						return;
					} else {
						return;
					}
				})
				return;
			},
			//打开确认操作的弹窗
			openConfrimModel: function(optionType) {
				let that = this;
				that.optionType = optionType;
				console.log("optionType", optionType);
				if (optionType == 0) {
					that.confirmContent = "确认要退出群聊吗?";
				}
				if (optionType == 1) {
					that.confirmContent = "确认要解散群聊吗?";
				}
				if (optionType == 2) {
					that.confirmContent = "确认要清空聊天记录吗?";
				}
				console.log("confirmContent", that.confirmContent);
				that.confirmModelFlag = true;
			},
			//关闭弹窗
			closeConfirmModel: function() {
				let that = this;
				that.optionType = 0;
				that.confirmContent = "";
				that.confirmModelFlag = false;
			},
			//确认操作（退出群聊，解散群组，清空聊天记录）
			confirmOption: function() {
				let that = this;
				let param = {
					groupId: that.currentChatGroupId,
				}
				//退出群聊
				if (that.optionType == 0) {
					that.$u.api.chatGroup.quitChatGroup(param).then(res => {
						if (res.code == 200) {
							let timestamp = new Date().getTime();
							let message = {
								"id": timestamp + "",
								"chatGroupId": that.currentChatGroupId,
								"userId": that.vuex_userInfo.id,
								"meFlag": true,
								"userName": that.vuex_userInfo.userName,
								"userAvatar": that.vuex_userInfo.avatar ? that.vuex_userInfo.avatar :
									"/static/image/default/default-user/default-user.png",
								'messageType': that.messageApi.MSG_TYPE.SYSTEM_MSG,
								"contentType": that.messageApi.CONTENT_TYPE.TEXT_CONTENT_TYPE,
								"content": {
									'text': that.vuex_userInfo.userName + "退出了群聊",
									'sysMsgType': that.messageApi.SYS_MSG_TYPE.quitGroup,
								},
								"createTime": that.globalUtil.getTimeStr(timestamp),
								"timestamp": timestamp,
								"platFrom": 1,
								"showTimeFlag": true,
							};
							this.globalWX.sendMessage(message, {
								complete: function(res) {
									if (res == true) {
										uni.switchTab({
											url: '/pages/tabbar/group/group'
										})
									} else {
										that.globalUtil.utilAlert("网络故障，稍后重试！");
										return;
									}
								}
							}, that.messageApi.BUSINESS_CODE.chatting);
						} else {
							that.globalUtil.utilAlert("退出群聊异常");
							return;
						}
					})
					return;
				}
				//解散群聊
				if (that.optionType == 1) {
					that.$u.api.chatGroup.delChatGroup(param).then(res => {
						if (res.code == 200) {
							console.log("群聊已解散");
							let timestamp = new Date().getTime();
							let message = {
								"id": timestamp + "",
								"createTime": that.globalUtil.getTimeStr(timestamp),
								"chatGroupId": that.currentChatGroupId,
								"userId": that.vuex_userInfo.id,
								"meFlag": true,
								"userName": that.vuex_userInfo.userName,
								"userAvatar": that.vuex_userInfo.avatar ? that.vuex_userInfo.avatar :
									"/static/image/default/default-user/default-user.png",
								'messageType': that.messageApi.MSG_TYPE.SYSTEM_MSG,
								"contentType": that.messageApi.CONTENT_TYPE.TEXT_CONTENT_TYPE,
								"content": {
									"text": '管理员已经解散当前群聊',
								},
								"createTime": that.globalUtil.getTimeStr(timestamp),
								"timestamp": timestamp,
								"platFrom": 1,
								"showTimeFlag": true,
							}
							that.globalWX.sendMessage(message, {
								complete: function(res) {
									if (res == true) {

									} else {
										that.globalUtil.utilAlert("网络故障，稍后重试！");
										return;
									}
								}
							}, that.messageApi.BUSINESS_CODE.deleteGroup);
						} else {
							that.globalUtil.utilAlert("群聊解散异常");
							return;
						}
					})
					return;
				}
				//清空聊天记录
				if (that.optionType == 2) {
					that.toClearChatContent();
					return;
				}
			},
			//去设置名字
			toUpdateChatName: function() {
				if (this.currentChatGroup.groupUser.memberType < 1) {
					this.globalUtil.utilAlert("无权限修改!");
					return;
				}
				let groupName = this.currentChatGroup.imGroup.groupName;
				let groupId = this.currentChatGroupId;
				let param = {
					"groupName": groupName,
					"groupId": groupId
				}
				this.$u.route("/pages/tabbar/group/set/updateGroupName", param);
			},
			
			toSetFriendName:function(){
				this.setFriendNamePopFlag=true;
				this.newFriendName=this.friendInfoObj.friendName;
			},
			submitSetFriendName:function(){
				let that=this;
				console.log("朋友信息",that.friendInfoObj);
				console.log("newFriendName",that.newFriendName);
				that.friendInfoObj.friendName=that.newFriendName;
				that.$u.api.imUser.updateFriendInfo(that.friendInfoObj).then(res => {
					if(res.code==200){
						this.getChatGroupInfo();
						uni.$emit("chattinGroupListener", false);
					}
					that.setFriendNamePopFlag=false;
				})
			},
			//去修改群头像
			toUpdateGroupAvatar: function() {
				if (this.currentChatGroup.groupUser.memberType < 1) {
					this.globalUtil.utilAlert("无权限修改!");
					return;
				}
				let groupAvatar = this.currentChatGroup.imGroup.groupAvatar;
				let groupId = this.currentChatGroupId;
				let param = {
					"groupAvatar": groupAvatar,
					"groupId": groupId
				}
				this.$u.route("/pages/tabbar/group/set/updateGroupAvatar", param);
			},
			//去设置公告
			toSetChatNotice: function() {
				let chatNotice = this.currentChatGroup.imGroup.groupNotice;
				let groupId = this.currentChatGroupId;
				let param = {
					"groupNotice": chatNotice ? chatNotice : '',
					"groupId": groupId,
					"advShowFlag": this.advShowFlag,
					"memberType": this.currentChatGroup.groupUser.memberType
				}
				this.$u.route("/pages/tabbar/group/set/updateGroupNotice", param);
			},
			//去查看群二维码
			toGroupQRCode: function() {
				let param = {
					group: JSON.stringify(this.currentChatGroup)
				};
				this.$u.route("/pages/chat/chatGroup/groupQRCode", param);
			},
			//设置群管理员
			toGroupAdminMember: function() {
				let param = {
					group: JSON.stringify(this.currentChatGroup)
				};
				this.$u.route("/pages/chat/chatGroup/group-admin-member", param);
			},
			//打开群数量设置
			setGroupNumber: function() {
				this.memberCountShow = true;
			},
			//设置群容量
			memberCountClick: function(e) {
				let that = this;
				let maxCount = e[0].value;
				let param = {
					id: that.currentChatGroupId,
					maxCount: maxCount
				}
				console.log("====设置群最大人数====", param);
				that.$u.api.chatGroup.updateGroupMaxCount(param).then(res => {
					if (res.code == 200) {
						if (res.code == 200) {
							that.globalUtil.utilAlert("更新成功!");
						} else {
							that.globalUtil.utilAlert("更新失败");
							return;
						}
						that.getChatGroupInfo();
					}
				})
			},
			/**修改我在群聊的信息*/
			updateMyChatGroupInfo(param) {
				let that = this;
				that.$u.api.chatGroup.updateMyChatGroupInfo(param).then(res => {
					if (res.code == 200) {
						that.globalUtil.utilAlert("更新成功!");
					} else {
						that.globalUtil.utilAlert("群聊信息更新失败");
						return;
					}
					that.getChatGroupInfo();
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.content-body {
		background-color: #ffffff;

		.scroll-Y {
			::-webkit-scrollbar {
				display: none;
				height: 0;
				width: 0;
			}

			max-height: 590rpx;
		}

		/* 九宫格start */
		.grid-box {
			//box-shadow: 1px 0px 1px 0px #D8D8D8;
			//text-align: center;
			//width: 100%;
			//margin: 10rpx 8rpx;
			background-color: #FFFFFF;
			border-radius: 10px;
			//border: 1rpx solid #D8D8D8;
		}

		.grid-body {
			padding: 30upx;
		}

		.grid-box .gird-item {
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			margin-bottom: 20upx;
		}

		.grid-box .image {
			width: 80upx;
			height: 80upx;
		}

		.grid-text {
			font-size: 28rpx;
			margin-top: 4rpx;
			color: $u-type-info;
			width: 120rpx;
			text-align: center;
		}

		.grid-box .text {
			font-size: 26upx;
			margin-top: 10upx;
			font-family: PingFangSC-Regular, PingFangSC;
			font-weight: 400;
			color: rgba(74, 74, 74, 1);
			line-height: 26 upx;
		}

		/deep/ .uni-grid-item__box.border-top {
			border-top: hidden;
		}

		/deep/ .uni-grid-item__box.border {
			border-bottom: hidden;
			//  border-right: hidden;
		}

		/* 九宫格end */
	}

	.footer-option {
		//border: 1px solid red;
		width: 100%;
		position: relative;
		top: 30rpx;
	}
</style>
<style>
	.footer-option button:after {
		border: none !important;
	}

	page {
		background-color: #ededed;
	}
</style>